1. Field of the Invention
This invention relates generally to a system and method for scheduling mixed-critical software applications on a common processor and, more particularly, to a system and method for scheduling harmonic mixed-critical software applications on a common processor, where application priority is based on execution frequency, and where higher critical applications having lower execution frequencies are divided into multiple segments to increase their execution frequency and priority, or lower critical applications having higher execution frequencies are lengthened to decrease their execution frequency and priority.
2. Discussion of the Related Art
Modern vehicles employ various embedded electronic controllers that improve the performance, comfort, safety, etc. of the vehicle. Such controllers include engine controllers, suspension controllers, steering controllers, power train controllers, climate control controllers, infotainment system controllers, chassis system controllers, etc. These controllers typically require special purpose software and algorithms to perform their control functions.
The current trend for vehicle electronic controllers is to provide multiple software applications for different functions operating on a common controller. For example, adaptive cruise control (ACC) systems, lane centering systems, lane keeping systems, stability control systems, etc. are all known in the art all of which automatically control vehicle steering and/or braking in some fashion. These systems often times employ the same sensor inputs and other variables, sometimes referred to as global variables, that when stored in memory can be used by more than one software application. For example, the ACC system may write sensor data into the controller memory during its operation on the processor, and the lane centering system may write that data into its software when it is running on the processor. Thus, it makes sense in many cases such as these to run multiple software applications on the same processor.
Providing multiple related software applications running on a common controller has obvious advantages for reducing system hardware and cost. However, operating different software applications on the same processor increases the complexity of the controller because of the scheduling required to run the different software applications and prevent the software applications from interfering with each other. Such mixed use applications operating on a single processor is further increased in complexity when a vehicle OEM provides additional software on a controller already having software provided by a supplier.
In most cases, the various software applications operating on a single processor will have mixed criticality, i.e., the applications will have higher or lower levels of importance relative to each other to provide safety, convenience, etc. For these types of systems, the scheduling algorithm that schedules the execution of each software application may interleave the operation of the applications together, where part of one software application runs, but may not finish, and stops so another application can run on the processor.
A scheduler for a processor operating mixed-criticality software applications will typically give the software application having the highest execution frequency or period, which means it executes the most often, the highest priority. Particularly, schedulers in mixed application shared resource systems base their priority on frequency of operation because that technique is the most commonly used scheduling technique to ensure that all of the applications will completely execute before the start time for their next execution run. Because scheduling priority is assigned based on execution frequency, a higher critical application, but with a lower priority, will be preempted by a lower critical application, but with a higher priority, when their execution interferes in time, sometimes referred to as a criticality inversion problem. More particularly, even though the highest frequency software application may not be the most critical application, current software schedulers would allow the software application having the fastest execution frequency to take precedent over the more critical software application if both applications were scheduled to run at the same time. For example, a particular software application operating on the processor may be required to operate very quickly in order to satisfy its particular function, where that function may not be overly important or critical. A more critical software application, such as a stability control algorithm, may only need to operate at a slower rate.
Various techniques are known in the art to effectively allow mixed-criticality software application to run on a single processor so that the more critical lower priority software applications are not preempted by less critical higher priority software applications. One known technique is referred to as dual priority scheduling (DPS) where each application running on the processor is assigned two priorities, where one priority is determined by how critical the software application is and the other priority is determined by how often the software application needs to be executed. Based on this, there are two execution modes at run time, namely, the normal execution mode based on the rate and the overload execution mode based on criticality. However, DPS has a number of drawbacks, including a very high run time overhead. In another known technique, referred to as zero-slack rate monotonic (ZSRM), each application has execution times for normal operation and overload operation. The scheduling is computed with the latest start time of a critical application to finish its overload computation. However, ZSRM requires different execution times which may lead to many scheduling variations requiring high cost for test and validation.